package cn.edu.nuc.bre.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 公告
 * @author 王凯
 *
 */
public class Announcement implements Serializable {
    
	/**
	 * 序列化id
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 公告id（自增）
	 */
	private Integer annoid;

	/**
	 * 发布公告的部门id
	 */
    private String deptid;

    /**
     * 公告内容
     */
    private String annocontent;

    /**
     * 公告发布时间
     */
    private Date annotime;

    /**
     * 公告状态0:不显示（删除）1：显示
     */
    private Integer annostate;

    public Integer getAnnoid() {
        return annoid;
    }

    public void setAnnoid(Integer annoid) {
        this.annoid = annoid;
    }

    public String getDeptid() {
        return deptid;
    }

    public void setDeptid(String deptid) {
        this.deptid = deptid;
    }

    public String getAnnocontent() {
        return annocontent;
    }

    public void setAnnocontent(String annocontent) {
        this.annocontent = annocontent;
    }

    public Date getAnnotime() {
        return annotime;
    }

    public void setAnnotime(Date annotime) {
        this.annotime = annotime;
    }

    public Integer getAnnostate() {
        return annostate;
    }

    public void setAnnostate(Integer annostate) {
        this.annostate = annostate;
    }

	@Override
	public String toString() {
		return "公告 [公告id=" + annoid 
				+ ", 发布部门id=" + deptid 
				+ ", 公告内容=" + annocontent 
				+ ", 发布时间=" + annotime 
				+ ", 公告状态=" + annostate + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((annoid == null) ? 0 : annoid.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Announcement other = (Announcement) obj;
		if (annoid == null) {
			if (other.annoid != null)
				return false;
		} else if (!annoid.equals(other.annoid))
			return false;
		return true;
	}

}